Skip to content

Labor attendance report 1626#1684

Open
Arohasina wants to merge 27 commits intodevelopmentfrom
Labor_Attendance_report_1626
Open

Labor attendance report 1626#1684
Arohasina wants to merge 27 commits intodevelopmentfrom
Labor_Attendance_report_1626

Conversation

@Arohasina
Copy link
Copy Markdown
Contributor

@Arohasina Arohasina commented Feb 25, 2026

Issue Description

Fixes #1626

  • We should have a sheet in the Reports downloads that shows labor attendance for the academic year. The report should have a list of labor students and the number of labor meetings that they attended for each term in the academic year.

Changes

  • Implemented laborAttendanceByTerm(term) function to query labor students and count their meeting attendance by term
  • Added "Labor Attendance By Term". There are two sheets: one for Fall term and one for Spring term (for the academic year)
  • added the test function test_laborAttendanceByTerm in test_spreadsheet.py

This is how the spreadsheet looks like:
image

Testing

  • run database/reset_database.sh test and then tests/run_tests.sh or if you want to test the laborAttendanceByTerm function specifically, you can run pytest tests/code/test_spreadsheet.py::test_laborAttendanceByTerm -v
  • after it passed, run database/reset_database.sh from-backup and then flask run
  • Once you are in the Celts app, go to event list choose Fall 2024, and then choose a couple of events there, such as these events
image
  • And for each, click on the event, turn on the toggle "This event is for labor only" , and then click "save"
image
  • And then do the same for Spring 2025.

  • Then go to admin --> report --> select academic year 2024 - 2025 --> download the spreadsheet, open it, and you should see a sheet called "Labor Attendance By Term" with the reporting, one for Fall and one for Spring term.

Copilot AI review requested due to automatic review settings February 25, 2026 22:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements a labor attendance report feature that tracks labor student participation in labor-only meetings across terms within an academic year. The implementation adds a new sheet to the downloadable reports spreadsheet showing each labor student's meeting attendance count per term.

Changes:

  • Added laborAttendanceByTerm() function to query and aggregate labor meeting attendance by student and term
  • Integrated the new "Labor Attendance By Term" sheet into the spreadsheet generation workflow
  • Added comprehensive integration test coverage for the new functionality

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
app/logic/volunteerSpreadsheet.py Implements laborAttendanceByTerm function (lines 228-249) to query labor students and count their meeting attendance, and integrates it into createSpreadsheet (line 298)
tests/code/test_spreadsheet.py Adds test_laborAttendanceByTerm integration test (lines 686-724) covering empty results and attendance counting scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 26, 2026 20:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Arohasina and others added 2 commits February 26, 2026 15:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 26, 2026 20:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 26, 2026 20:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 29, 2026 02:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ojmakinde
ojmakinde previously approved these changes Mar 31, 2026
Copy link
Copy Markdown
Contributor

@ojmakinde ojmakinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copilot AI review requested due to automatic review settings March 31, 2026 21:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 31, 2026 21:09
@Arohasina Arohasina requested review from Copilot and removed request for Copilot March 31, 2026 21:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Arohasina Arohasina force-pushed the Labor_Attendance_report_1626 branch from 596e485 to 68ca9ef Compare March 31, 2026 21:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 31, 2026 21:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Arohasina
Copy link
Copy Markdown
Contributor Author

I noticed the spring report didn't include zero attendance (for labor students). Brian suggested a roster membership rule for labor attendance reports. Include a student in the labor roster if either:

  1. the spreadsheet term exactly matches their CeltsLabor term, OR
  2. their CeltsLabor row is an academic-year assignment and belongs to the same academic year as the spreadsheet term.

Academic-year labor rows are stored once (typically on Fall), but we generate both Fall and Spring
sheets. Without this rule, Spring can miss labor students who attended 0 labor events, so those students do not appear with a zero count. So I added that fix.

Copilot AI review requested due to automatic review settings March 31, 2026 22:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

View Code Coverage

Copy link
Copy Markdown
Contributor

@MImran2002 MImran2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is still under review. I am revisiting the peewee again during lunch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Labor Attendance report

5 participants